﻿@model IEnumerable<LandManager.Web.Models.UserInfo>

@{
    ViewBag.Title = "Index";
    var agencyList = ViewBag.Agency;
}

<style type="text/css">
    .divSty {
        padding: 25px 15px 5px 15px;
        font-family: 'Microsoft YaHei';
    }

    .tbSty {
        width: 100%;
        table-layout: fixed;
        border: solid #9D9D9D;
        border-width: 1px 0px 0px 1px;
    }

    .tdSty {
        word-wrap: break-word;
        text-align: center;
        vertical-align: middle;
        border: solid #9D9D9D;
        border-width: 0px 1px 1px 0px;
        font-size: 0.8em;
    }

    .tdheaderSty {
        text-align: center;
        vertical-align: middle;
        border: solid #9D9D9D;
        border-width: 0px 1px 1px 0px;
        font-size: 0.9em;
        height: 35px;
    }

    .headerSty {
        word-wrap: break-word;
        text-align: center;
        vertical-align: middle;
        background-color: #2573c7;
        color: #FFFFFF;
    }

    .selectSty {
        height: 26px;
        width: 210px;
    }

    .textStyle {
        height: 20px;
        width: 190px;
    }

    .texttdSty {
        padding-right: 15px;
    }

    .btnSty {
        width: 120px;
        height: 26px;
        vertical-align: central;
        margin: auto 10px auto 10px;
    }

    .btnSty_export {
        width: 32px;
        height: 32px;
        margin: 0px 10px auto auto;
        vertical-align: central;
        background: url(../../images/btn_exp_detail_press.png) no-repeat;
        background-size: cover;
        border: 0px;
        cursor: pointer;
    }

    .aSty {
        width: 100px;
        height: 32px;
        line-height: 32px;
        vertical-align: central;
        margin: auto auto auto 10px;
        text-align: center;
        vertical-align: central;
        text-align: center;
        /*background: url(../../images/btn_exp_detail_press.png) no-repeat;*/
        /*background-size: cover;*/
        background: #2573c7;
        color: #fff;
        border: 0px;
        cursor: pointer;
        display: inline-block;
        text-decoration: none;
    }

</style>

<p>
    @Html.ActionLink("添加用户", "Create", null, new { @class = "aSty", title = "添加用户" })
    @*<a href="~/User/Create" class="aSty">添加用户</a>*@
</p>

<div class="divSty">
    <table class="tbSty" cellspacing="0">
        <tr class="headerSty">
            <td class="tdheaderSty" style="width: 10%">用户名</td>
            <td class="tdheaderSty" style="width: 10%">机构</td>
            <td class="tdheaderSty" style="width: 5%">是否管理员</td>
            <td class="tdheaderSty" style="width: 5%">操作</td>
        </tr>
        @foreach (var item in Model)
        {
            <tr>
                <td class="tdSty">@item.user_name</td>
                <td class="tdSty">@item.Agency.agency_name</td>
                <td class="tdSty">
                    @if (item.user_isAdmin == 1) 
                    {
                        <label>是</label>
                    }
                    else {
                        <label>否</label>
                    }                       
                </td>
                <td class="tdSty">@Html.ActionLink("修改", "Edit", new { id = item.user_id })</td>
            </tr>
        }
    </table>
</div>
